<template>
    <Pie :percent="true" :config="config" title="运费结算情况" desc="Pie1" />
</template>

<script setup>
import {ref} from 'vue';
import Pie from '../components/Pie.vue';

const data = [
    {
        value: 1000,
        unit: '元',
        type: '已付款',
    },
    {
        value: 1000,
        unit: '元',
        type: '已付款',
    },
    {
        value: 1000,
        unit: '元',
        type: '已付款',
    },
    {
        value: 1000,
        unit: '元',
        type: '已付款',
    },
    {
        value: 1000,
        unit: '元',
        type: '已付款',
    },
    {
        value: 1000,
        unit: '元',
        type: '已付款',
    },
];

const config = ref({
    series: [
        {
            label: {
                formatter: item => {
                    const {value, type, unit} = item.data;
                    return `${type}\n${value}${unit}`;
                },
                color: '#151B26',
                fontSize: 14,
                lineHeight: 20,
            },
            data,
        },
    ],
});
</script>

<style scoped></style>
